title: XML to SQL Columns and value
body: <p>I have this xml value as a column in a table:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-16"?&gt;
  &lt;table&gt;
    &lt;id&gt;{44f2e878-64a6-4217-acba-2d986cbb0f93}&lt;/id&gt;
    &lt;rows&gt;
      &lt;row&gt;
        &lt;columns&gt;
          &lt;column name="wc_Bin" value="BIN-2" type="System.String" /&gt;
          &lt;column name="wc_replacebin" value="BIN-3" type="System.String" /&gt;
          &lt;column name="wc_client" value="70360" type="System.String" /&gt;
          &lt;column name="ec_weight" value="150" type="System.Decimal" /&gt;
          &lt;column name="DefaultKey" value="1" type="System.Int32" /&gt;
        &lt;/columns&gt;
      &lt;/row&gt;
      &lt;row&gt;
        &lt;columns&gt;
          &lt;column name="wc_Bin" value="BIN-3" type="System.String" /&gt;
          &lt;column name="wc_replacebin" value="Bin-1" type="System.String" /&gt;
          &lt;column name="wc_client" value="1000058" type="System.String" /&gt;
          &lt;column name="ec_weight" value="250" type="System.Decimal" /&gt;
          &lt;column name="DefaultKey" value="2" type="System.Int32" /&gt;
        &lt;/columns&gt;
      &lt;/row&gt;
      &lt;row&gt;
        &lt;columns&gt;
          &lt;column name="wc_Bin" value="Bin-1" type="System.String" /&gt;
          &lt;column name="wc_replacebin" value="BIN-2" type="System.String" /&gt;
          &lt;column name="wc_client" value="1000006" type="System.String" /&gt;
          &lt;column name="ec_weight" value="100" type="System.Decimal" /&gt;
          &lt;column name="DefaultKey" value="3" type="System.Int32" /&gt;
        &lt;/columns&gt;
      &lt;/row&gt;
    &lt;/rows&gt;
    &lt;key&gt;DefaultKey&lt;/key&gt;
    &lt;total&gt;0&lt;/total&gt;
    &lt;data /&gt;
    &lt;parameters /&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>I want column name from <code>&lt;column name="wc_bin"&gt;</code> and its value from <code>value=""</code> attribute. Desired output is:</p>
  
  <pre><code>wc_Bin   Replace_Bin   wc_Client    ec_weight
  ----------------------------------------------
  Bin-2    Bin-3         70360          350
  bin-3    Bin-1         1000058        250
  Bin-1    Bin-2         100006         100
  </code></pre>
  
  <p>Any help appreciated.</p>