Use CASE. It is standard, handles ranges and NULL branches explicitly, and ports with no edits. The shorthands save a few characters but tie the query to one engine, and DECODE's equality-only matching plus its NULL-equals-NULL rule change results when someone translates it to CASE by hand.
Where they differ
CASE WHEN … THEN … ELSE … END is the SQL-standard conditional and works in all five engines. Each engine except PostgreSQL also has a shorthand: IIF in SQL Server and SQLite, IF in MySQL, DECODE in Oracle.
How each engine writes it
SQL Server
SELECT name, CASE WHEN score >= 90 THEN 'A' WHEN score >= 80 THEN 'B' ELSE 'C' END AS grade FROM exams;
IIF(score >= 90, 'A', 'C') is a two-branch shorthand (2012+) that SQL Server rewrites into CASE; more than two outcomes means nesting IIFs.
PostgreSQL
SELECT name, CASE WHEN score >= 90 THEN 'A' WHEN score >= 80 THEN 'B' ELSE 'C' END AS grade FROM exams;
CASE is the only built-in conditional: no IIF, no IF, no DECODE.
MySQL
SELECT name, CASE WHEN score >= 90 THEN 'A' WHEN score >= 80 THEN 'B' ELSE 'C' END AS grade FROM exams;
IF(score >= 90, 'A', 'C') is the MySQL shorthand; IFNULL and NULLIF cover the NULL cases.
SQLite
SELECT name, CASE WHEN score >= 90 THEN 'A' WHEN score >= 80 THEN 'B' ELSE 'C' END AS grade FROM exams;
iif(cond, a, b) exists since 3.32 and is exactly a two-branch CASE.
Oracle
SELECT name, CASE WHEN score >= 90 THEN 'A' WHEN score >= 80 THEN 'B' ELSE 'C' END AS grade FROM exams;
DECODE(score, 100, 'A', 90, 'A', 'C') tests equality only, so it can't express ranges; CASE can.
Questions that come up
Why does my CASE return NULL when I have no ELSE?
A CASE without ELSE yields NULL when no branch matches. Add an explicit ELSE when you want a fallback value.
What is DECODE's NULL surprise?
DECODE treats two NULLs as equal, so DECODE(col, NULL, 'none', 'other') returns 'none' for NULL rows. The direct translation CASE col WHEN NULL THEN 'none' ELSE 'other' END never matches, because it tests col = NULL. Translate it as CASE WHEN col IS NULL THEN 'none' ELSE 'other' END.
Can CASE return different types per branch?
The engine picks one result type for the whole expression, and the rules differ. SQL Server uses data type precedence, so CASE … THEN 'A' ELSE 95 END fails when it tries to convert 'A' to int. PostgreSQL tries to read 'A' as an integer and fails, Oracle rejects the mix with ORA-00932, and MySQL and SQLite return the values as they are. Cast every branch to the same type.