For example:
SELECT a,
IF (c = DECODE(b, "foo1", "bar1", "foo2", "bar2") THEN c ELSE 0),
IF (d != DECODE(b, "foo1", "bar1", "foo2", "bar2") THEN d ELSE 2),
IF (e = DECODE(b, "foo1", "bar1", "foo2", "bar2") THEN e ELSE 5)
FROM x
Seems like there should be a less repetitive way to do this…
use