title: Required additional row in select on the basis of some condition
body: <p>I have a table with columns : attribute_1,attribute_2,org_name,country</p>
  
  <pre><code>attribute_1  attribute_2  org_name  country
  wcc_4599        null        org1     IN
  wcc_0123        wcc_1983    org2     IN
  wcc_2390        null        org3     US
  wcc_5647        wcc_8789    org4     IN
  </code></pre>
  
  <p>My requirements are :</p>
  
  <ol>
  <li><p>On the basis of following conditions i have to decide the document_type</p>
  
  <pre><code>     (i) if country  = India , attribute_1 != null, attribute_2  = null THEN Document Type ==&gt; PAN
      (ii) if country  = India , attribute_1 != null, attribute_2 != null THEN Document Type ==&gt; PAN , PROPRIETORSHIP DOCUMNENT
     (iii) if country != India , attribute_1 != null, attribute_2  = null THEN Document Type ==&gt; COMPANY REGISTRAION DOCUMENT
  </code></pre></li>
  <li><p>for case (ii) i need to show two rows for each record, first for attribute_1 and second for attribute_2</p></li>
  </ol>
  
  <p>I have following query</p>
  
  <pre><code>SELECT   
       attribute_1,
       attribute_2,
       upper(org_name) org_name,                      
       country,
  CASE
      WHEN country = 'IN'
           AND attribute_1 IS NOT NULL
           AND attribute_2 IS NULL THEN 'PAN'
      WHEN country = 'IN'
           AND attribute_1 IS NOT NULL
           AND attribute_2 IS NOT NULL THEN 'PAN , PROPRIETORSHIP DOCUMNENT'
      WHEN country != 'IN'
           AND attribute_1 IS NOT NULL
           AND attribute_2 IS NULL THEN 'COMPANY REGISTRAION DOCUMENT'     
  END
  doc_name
              FROM
                  tbl_1
              ORDER BY
                  created_date_time;
  </code></pre>
  
  <p>OUTPUT :</p>
  
  <pre><code>attribute_1  attribute_2  org_name  country doc_type
  wcc_4599        null        org1     IN      PAN
  wcc_0123        wcc_1983    org2     IN      PAN, PROPRIETORSHIP DOCUMENT
  wcc_2390        null        org3     US      COMPANY REGISTRAION DOCUMENT
  wcc_5647        wcc_8789    org4     IN      PAN, PROPRIETORSHIP DOCUMENT
  </code></pre>
  
  <p>But i need output like :</p>
  
  <pre><code>attribute_1_2  org_name country doc_type
  wcc_4599        org1     IN      PAN
  wcc_0123        org2     IN      PAN
  wcc_1983        org2     IN      PROPRIETORSHIP DOCUMENT
  wcc_2390        org3     US      COMPANY REGISTRAION DOCUMENT
  wcc_5647        org4     IN      PAN
  wcc_8789        org4     IN      PROPRIETORSHIP DOCUMENT
  </code></pre>
  
  <p>For the time being i have created a procedure to get the required output. But I want to do this by query. Is it possible?</p>
  
  <p>Thanks!</p>