I'm trying to use a variable as a case condition, however it seems you cannot, as the error I get is "constant expected"

I'm wondering if there is a way to work around this limitation?

my variable is a string.

>I'm trying to use a variable as a case condition

No! case label must be a constant value.

Ok thanks.

if's it is then.