SELECT DECODE (value,
<if this value>, <return this value>,
< if this value>, <return this value>,
....)
FROM dual;
If you have a default value that you want to display if any of the conditions are not met, you can add another comma and specify the default value like this:
SELECT DECODE (value,
if this value, return this value,
if this value, return this value,
otherwise this value
FROM dual;
For a thorough description of all features of this DECODE function, see the Puget Sound Oracle User's Group description.
Here are some further examples from another post on my blog:
Most Oracle SQL users do not realize the power of this function. Hopefully this post will enlighten some on it.