Though it's most likely too late for the OP, I just worked out my own switch and thought I'd share it here for future readers. My solution uses solely the package 'xifthen'xifthen ('ifthen'ifthen suffices too, but I already had 'xifthen'xifthen installed...).
% Switch implementation \usepackage{xifthen} \newcommand{\ifequals}[3]{\ifthenelse{\equal{#1}{#2}}{#3}{}} \newcommand{\case}[2]{#1 #2} % Dummy, so \renewcommand has something to overwrite... \newenvironment{switch}[1]{\renewcommand{\case}{\ifequals{#1}}}{} % Example: Pick color by ID \newcommand{\incolor}[2]{ \begin{switch}{#1} \case{1}{\color{red}} \case{2}{\color{blue}} \case{3}{\color{green}} \case{4}{\color{black}} #2 \end{switch} } This code compiles perfectly fine in my TeXMaker (ofc. you'll need the color-package for this example, but it's not part of the switch). The example colors a given input in a color defined by an ID I chose (Usage: \incolor{ID}{Content}\incolor{ID}{Content}). I used it for shorthand notations of lots of things (e.g. \lp1\lp1, \lp2\lp2, ... for paranthesesparentheses in different colors using \newcommand{\lp}[1]{\incolor{#1}{\langle}}\newcommand{\lp}[1]{\incolor{#1}{\langle}}). Feel free to experiment ;)
I could imagine this to be expanded to a solution using only built-in control structures, but I've been too lazy for now to do so, yet \ifx\ifx and \else\else should do the trick.