I want to compare two dates from two columns and get the greatest and then compare against a date value.The two column can hold NULL values too.For example I want the below OUTP
Use Oracle CASE... WHEN structure in your select:
SELECT COLA, COLB, CASE WHEN (COLA >= COLB OR COLB IS NULL) THEN COLA ELSE COLB END AS OUTPUT FROM ...