SQL Server : create view or procedure?
<p>Currently I'm working on a project with sql server database on it. I have a problem with some query. i have a table:</p>

<p><strong>Current table:</strong></p>

<pre><code> Month   | Year   |   EmpID  | Salary 
 ------------------------------------
  1          2016       123     100
  2          2016       123     120 
  3          2016       123     110 
  4          2016       123     150 
  1          2016       456     200 
  2          2016       456     210 
  3          2016       456     225 
  4          2016       456     220
</code></pre>

<p>And I want to create something with result like this:</p>

<p><strong>After query table:</strong></p>

<pre><code>EmpID    |  Salary1   |  Salary2 |  Salary3 | Salary4 
123          100          120         110       150
456          200          210         225       220
</code></pre>

<p>Note : naming salary table based on month table so there will be Salary12</p>

<p>What query should I type? Should I create a view or a stored procedure for this?</p>