title: NVL used within a case statement and a where clause
body: <p>I have a <code>WHERE</code> clause in which a <code>CASE</code> statement is used with NVL. Can someone explain the logic used in the below query?</p>
  
  <pre><code>SELECT * FROM employee
  WHERE
  (
      CASE WHEN(employeeid IS NOT NULL
                AND (SELECT 1 FROM optemp a WHERE nvl(a.indicator,'`')= 'Y'))
           THEN 0
           ELSE 1
           END
  )=1;
  </code></pre>