Change dashboard variables passed down to panel

The variables used for filtering can be accessed by $variabble or [[variable]] operator. Is there a way to do some condition checking and transform it so that each panel can have a different value of it.
For e.g assuming the $variable is eur, i would like to condition check like

if $variable in ['eur",“europe”,“Europe”] then $variable=“europe” else none

That’s not supported.