title: Select either one of the row with condition
body: <p>I have this sql table and rows defined in <a href="http://sqlfiddle.com/#!4/0ea65/1" rel="noreferrer">SQL Fiddle</a></p>
  
  <p>In <strong>SUPPLIER_DETAILS</strong> table there is a field called <strong>IS_PAYABLE</strong> which will have values either null or 'Y'.</p>
  
  <p>If <code>IS_PAYABLE='Y'</code>, there could be one or more records for each <strong>PRODUCT_REG</strong> with different <strong>PRODUCT_NO</strong>.
  E.g. <code>PRODUCT_REG = 'HP_C20'</code> has two records with <code>IS_PAYABLE='Y'</code>.</p>
  
  <pre><code>HP_C20  FR-A    GB-A128     Y
  HP_C20  FR-A    GB-A098     Y
  </code></pre>
  
  <p>What I would like to have is if <code>IS_PAYABLE='Y'</code> and if there are multiple records for one <strong>PRODUCT_REG</strong>, then I would want only either one of the record and I want all the records with <code>IS_PAYABLE is null</code>.</p>
  
  <p>How can I achieve this? If I did not make my requirement understandable, I will explain further.</p>
  
  <p>Any help is highly appreciable.</p>
  
  <p>Thanks</p>