title: if(condition, then, else) in Oracle
body: <p>MySQL/MSSQL has a neat little inline if function you can use within queries to detect null values, as shown below.</p>
  
  <pre><code>SELECT
  
  ...
  
  foo.a_field AS "a_field",
  SELECT if(foo.bar is null, 0, foo.bar) AS "bar",
  foo.a_field AS "a_field",
  
  ...
  </code></pre>
  
  <p>The problem I'm running into now is that this code is not safe to run on an Oracle database, as it seems not to support this inline if syntax.</p>
  
  <p>Is there an equivalent in Oracle?</p>