sql decode

Solutions on MaxInterview for sql decode by the best coders in the world

showing results for - "sql decode"
Isaac
27 Mar 2016
1DECODE(X, D1, R1, D2, R2, D3, R3, ..., Rx)
2/*
3if X = D1 then return R1
4else if X = D2 then return R2
5else if X = D3 then return R3
6...
7else return Rx
8*/