title: How to use Case statement in Postgresql?
body: <p>This is my SQL Query</p>
  <pre><code>CASE WHEN (1&gt;2) THEN(
      select * from rate limit 10
      )
      ELSE
      (
      select * from rate limit 1
      )
  </code></pre>
  <p>When I use Case statement like above , I can get error like below.</p>
  <pre><code>ERROR:  syntax error at or near &quot;CASE&quot;
  LINE 2: CASE WHEN (1&gt;2) THEN(
          ^
  SQL state: 42601
  Character: 2
  </code></pre>
  <p>Can anyone help me to solve this</p>