title: To get records based on a certain value (if value present). If value not present get records based on another value
body: <p>I have the following table :</p>
  
  <pre><code>A  |  B  | C
  1    I    as 
  2    E    as
  1    E    sa
  3    I    as 
  2    I    sa
  3    I    sa 
  4    E    as 
  4    E    ad
  1    I    as
  2    D    sd
  3    D    sa
  </code></pre>
  
  <p>OUTPUT Table:</p>
  
  <pre><code>A  |  B  | C 
  1    I    as
  2    E    as
  1    E    sa 
  3    I    as
  3    I    sa  
  4    E    as 
  4    E    ad
  </code></pre>
  
  <p>all those records should be selected which have the value <code>E</code> in field B. If the same record (for field A and C) for the record I in field B, then it should not be selected. If there is no value <code>E</code> for the values in A and B then the record with field <code>I</code> should be selected.</p>