The Oracle and PL/SQL NVL2 function return different values based on whether the input value is NULL or not.
If expr1 is not null, then NVL2 returns expr2.
If expr1 is null, then NVL2 returns expr3.
The general format is:
NVL2(expr1, expr2, expr3)
Example 1:
SELECT NVL2(STATUS,'value','none') FROM INVOICE;
returns:
value
value
none
value