title: How do you print the day name given a day number in SQL Server 2005 using SQL commands?
body: <p>I want to be able to pass in a day number like 1, 2, 3 or 7 and it will return the day name like Sunday, Monday, Tuesday or Saturday. I know there is the option of using a <code>case</code> statement but I would like to do this using SQL commands, would this be at all possible?</p>
  
  <pre><code>DECLARE @m VARCHAR
  SET @m=1
  SELECT CASE WHEN @m=1 THEN 'Sunday' END
  </code></pre>
  
  <p>I have already commented on this <a href="https://stackoverflow.com/questions/2332645/how-can-i-determine-a-day-name-in-sql-server-2005">question</a> when looking for an answer but user @harper suggested that I should submit a new question with a full description.</p>
  
  <p><strong>EDIT:</strong>
  there is currently answers are given for case statement mostly except one . so again now i am putting my question again here  is </p>
  
  <p><strong>" I would like to do this using SQL commands, would this be at all possible?"</strong></p>