/*This SQL script uses Demos.abs database. 
  Please open ...\AbsoluteDatabase\Demos\Data\Demos.abs database file.
  This sample illustrates use of SEARCHED CASE construction.
  The query retrieves all events and notification whether it had happened already.*/

select e1."Event_Name", 
  case 
    when e1."Event_Date" < now then "In the past" 
    when e1."Event_Date" > now then "In the future" 
    else "Right now" 
  end as "When"
  from "events" e1
