Switch case questions

As zhomeslice demonstrates, you can use a computed value.

However, the entire point of a switch statement is that ideally the compiler can crunch it down to a jump table. So it's best if your values are tightly packed rather than sparse, rather than spaced 10 values apart.