title: How can I achieve IF ELSE under clause of WHERE?
body: <p>I want to use <strong>If Else</strong> (or similar case determining tech:) under filterring clause of <strong>WHERE</strong>.
  Here is my sample code.</p>
  
  <pre><code>select * from some_table
  where 
  record_valid_flg = 1 and
  if(user_param = '1')
  then age &gt; 20
  else
  name like 'Mr%'
  end if
  </code></pre>
  
  <p>How can I figure it out. I would really appreciated any suggestions.. Thanks!</p>