You can do much better: a \newcasecommand
that can deal with arbitrary labels, not only numbers.
\documentclass{article}
\usepackage{xparse}
\ExplSyntaxOn
\NewDocumentCommand{\newcasecommand}{ m m O{No~default~value} }
{
\cs_new_protected:Npn #1 ##1
{
\str_case:nnF { ##1 } { #2 } { #3 }
}
}
\ExplSyntaxOff
\newcasecommand{\mycommand}{%
{0}{The number is zero}
{1}{The number is one}
{x}{We have x}
}[Boo!]
\begin{document}
\mycommand{0}
\mycommand{1}
\mycommand{x}
\mycommand{foo}
\end{document}
The syntax is
\newcasecommand{<command>}{
{<string-a>}{<text for case a>}
{<string-b>}{<text for case b>}
...
}[<text for no match>]
The final argument is optional; the default is printing an informative text, which could be turned into a warning.

\ifnum
conditional (and also\ifcase
), but you may be better off using etoolbox's arithmetic tests.