Sometimes you write a query against your database, which will return for example the following result:
ID firstName lastName driversLicense 198 Peter Mustermann 12 199 Ruediger Salzmann 3 [...]
But it would be much nicer, for person who is not so deep into your data model, to replace the driversLicense numbers with the concrete names like:
ID firstName lastName driversLicense 198 Peter Mustermann B 199 Ruediger Salzmann C1E [...]
So, how does this work?
SELECT id, firstName, lastName, DECODE(driversLicense, 1, 'A', 2, 'A1', 3, 'C1E', 12, 'B', 13, 'BE') FROM users;
Pretty easy and the non technical user knows also which Driverslicense the User has..