I need an if statement that can handle 3 variables.

Example:
If A1="X" then 1
If A1="Y" then 2
If A1="Z" then 3

With standard if then I can only 2 outcomes.