I have defined a conditional using the ifthen package as:
\newcommand{\Switch}[1] { \ifthenelse{\equal{#1}{1}}{Test1}{Test2} }
Running this command works without problem. However, if I try to place it within a Figure Caption, it produces an error (i.e., \Switch{1} and \caption{Example text} work fine, but \caption{\Switch{1}} does not).
Is this expected behavior? How do I work around it to produce a conditional caption?
