eqnarray is not required in order for cases to work. Moreover, it's deprecated in terms of its support/usage and should therefore not be used. Rather use align (see \eqnarray vs \align. You're most likely after:

\documentclass{article}
\usepackage{amsmath}% http://ctan.org/pkg/amsmath
\begin{document}
\begin{align*}
a = \begin{cases}
x & \text{if $y=1$} \\
z & \text{if $b=2$}
\end{cases}
\end{align*}
\end{document}
amsmath provides cases as well as \text and align, although align is technically not needed for such an elementary equation. Using an equation environment (or unnumbered \[ ... \]) would suffice.
You could also obtain the above output manually using
\documentclass{article}
\begin{document}
\[
a = \left\{\begin{array}{@{}l@{\quad}l}
x & \mbox{if $y=1$} \\[\jot]
z & \mbox{if $b=2$}
\end{array}\right.
\]
\end{document}
\usepackage{amsmath}to the preamble. Have you loadedamsmath? – Scott H. Jul 15 '12 at 18:11