title: nested case in databricks using spark sql
body: <p>I am trying to use nested case in spark SQL as in the below query</p>
  <pre><code>%sql SELECT CASE WHEN 1 &gt; 0 THEN 
  CAST(CASE WHEN 2 &gt; 0 THEN 2.0 ELSE 1.2 END AS INT)
  ELSE &quot;NOT FOUND &quot;
  </code></pre>
  <p>however, I am coming across the error</p>
  <pre><code>Error in SQL statement: ParseException: 
  mismatched input '1' expecting {&lt;EOF&gt;, ';'}(line 1, pos 17)
  
  == SQL ==
  SELECT CASE WHEN 1 &gt; 0 THEN 
  -----------------^^^
  CAST(CASE WHEN 2 &gt; 0 THEN 2.0 ELSE 1.2 END AS INT)
  ELSE &quot;NOT FOUND &quot;
  </code></pre>
  <p>does databricks support nested case statement? and if yes, then please suggest what is the issue in the above code.</p>