title: Using regexp_like in case statement for and condition
body: <p>I have these data in my table </p>
  
  <pre><code>emp_id   emp_sal   emp_addr
  1        1000      10-jul-13
  2        2000      00002000
  3        3000      AMP
  4        4000      10-oct-2013
  5        5000      0.1122
  9        9000      panna
  10       1000      10-oct-13
  11       1000      -60
  12       1010      10-10-10
  13       1010      10-10-2010
  </code></pre>
  
  <p>I want to select all data with condition that where</p>
  
  <ol>
  <li>if emp_addr have date in dd-mon-yy then should come as it is.</li>
  <li>if emp_addr have date in dd-mm-yy then should come in dd-mon-yy .</li>
  <li>if emp_addr have number or character then default date should '31-31-2099'.</li>
  </ol>
  
  <p>I have tried this query:-</p>
  
  <pre><code>select * from sunil_test 
  WHERE emp_id in (1,2,3,4,5,9,10,11,12,13)
    and case when regexp_like(emp_addr
                           , '[[:digit:]]{2}-[[:alpha:]]{3}-[[:digit:]]{2}') 
             then emp_addr
             when regexp_like(emp_addr
                          , '[[:digit:]]{2}-[[:digit:]]{2}-[[:digit:]]{2}') 
             then to_char(to_date(emp_addr,'dd-mm-yy'),'dd-mon-yy')
             else '31-31-99'
        end = 1
  </code></pre>
  
  <p>I have to use these condition in where clause and using SQL only not PLSQL.</p>