Didn't I say that in the first place....?
Switches have to be constant...so you could just use a series of ifs