SQL Pivot or something else ? : <p>Situation is little bit complicated. I have table with next structure and data:</p>

<pre><code>+--------------+--------------+-------------+
|  Direction   | Denomination |  Den_Count  |
+--------------+--------------+-------------+
|      OUT     | 100          | 54          | 
|      OUT     | 200          | 56          |
|      IN      | 1000         | 75          |
|      IN      | 2000         | 408         |
|      IN      | 5            | 23          |
|      OUT     | 10           | 39          |
+--------------+--------------+-------------+
</code></pre>

<p>For a purpose of creating csv files for future extraction I need to have output like this:</p>

<pre><code>+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+
| 100 | NULL| 200 | NULL| 500 | NULL| 1000| NULL| 2000| NULL|
+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
| IN  | OUT | IN  | OUT | IN  | OUT | IN  | OUT | IN  | OUT |
+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|1111 |1000 | 2222| 0   | 333 |  0  | 555 |  0  | 100 | 68  |
+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
</code></pre>

<p>Any Idea ? I am using MS SQL Server 2014</p>
