Check user changed his password recently or not in specific period
Your query doesn't returns a result when there's no id matching 'some_id'. 

Well, there's a trick to force a row, use an aggregate function.

I think this is your logic rewritten to a single CASE (of course COALESCE is just a shortcut for a CASE :-)

SELECT COALESCE(MIN(CASE WHEN Greatest(COALESCE(last_login_date, to_date('20160401','yyyymmdd'))
                                      ,to_date('20160401','yyyymmdd')
                             + COALESCE(not_change_day, 90) &gt; sysdate 
                         THEN 'true'
                     END)
                    ,'false')
FROM FT_PWD_CHANGE
WHERE id='foo'


Btw, for a hard-coded date I would prefer DATE '2016-04-01' over to_date('20160401','yyyymmdd'), it's shorter and Standard SQL.