title: plsql conditional where clause
body: <p>I'd like to perform a conditional <code>where</code> in a sql statement, and use two different criteria, e.g. in pseudo code:</p>
  
  <pre><code>procedure(..., bool_value IN boolean default false) is
  ....
  begin
  
  select * from mytable mt
  where 
       if bool_value = true then mt.criterion_1 = value
       else
          mt_.criterion_2 = value; -- if boolean value is set, use criterion_1 column, otherwise use criterion_2 column
  
  end
  </code></pre>
  
  <p>Suppose it's possible, What's the best way to do it?</p>
  
  <p>Thanks</p>