title: Get a list of table column names and values
body: <p>I have a table which have some fields and values. I am trying to get a list of table column names and values (column name-value pairs).</p>
  
  <p>For example, I have below table with fields and values:</p>
  
  <p>MyTable:</p>
  
  <pre><code>Field1 Field2 Field3 .... FieldN
   89      34     10          233
  </code></pre>
  
  <p>So I want to get below table (field name - field value pair):</p>
  
  <pre><code>FieldName  FieldValue
  Field1     89
  Field2     34
  Field3     10
  ...
  FieldN     233
  </code></pre>
  
  <p>I mean a table with two fields: FieldName as text and FieldValue as number.</p>
  
  <p>To get a list of table column names I perform below:</p>
  
  <pre><code>SELECT NAME  FROM  sys.columns  WHERE object_id = OBJECT_ID('schema.MyTable')
  </code></pre>
  
  <p>but I do not know how to obtain the value for each column name. How can I do this?</p>