I'm thinking of something like...
answer = 2;
character = lookup('A', 'B', 'C', 'D', 'E');
Printing character would show 'C' (or maybe 'B' depending on how you index the lookup items).
The closest thing I can think of is to use a table (an array of numbers or characters), then walk through the array with a loop until the desired object is found.