Look into using the CASE statement.