Set variable using a case statement

Case statements are obviously a tidy alternative to using simple if/else statements, and I recently found myself in a position where I had a good opportunity to use one. First off, let’s look at the syntax. In the above syntax example, we have the variable…