title: Return Column name in case statement but no table involved
body: <p>Hi Can anyone help with the problem below, I have a stored procedure which depending on the month and date, depends on which image is returned. I have found plenty of examples of how to solve this when the data is in a table, but no solutions on how I'm doing it.</p>
  
  <p>The reason why I'm doing it this way is because it will be easier to modify the sql in the procedure than having to change and upload the new code to the website.</p>
  
  <pre><code>DECLARE @CurrentMonth int
  SET @CurrentMonth = ( MONTH(GETDATE()))
  
  DECLARE @CurrentDate int
  SET @CurrentDate = ( Day(GETDATE()))
  
  --DECLARE @Url varchar(100)
  --SET @URL = ''
  
  
      SET NOCOUNT ON;
  
      SELECT
            --Set image for xmas
            CASE WHEN @CurrentMonth = 12 AND @CurrentDate = 25
               THEN (SELECT 'imagetest.png' AS URL)
            --Set for easter
             WHEN @CurrentMonth = 3 AND @CurrentDate = 19
               THEN (SELECT 'imagetest2.png' AS url)
            --Keep setting images for events
            WHEN @CurrentMonth = 3 AND @CurrentDate = 19
               THEN (SELECT 'imagetest3.png' AS url)
            --If no match, return default image
            ELSE (SELECT 'logo.png' AS url)
         END
  
        -- return @URL
      END 
  </code></pre>
  
  <p>The sp executes ok, but the column is (No Column Name) when what I want is url as the column  name. </p>
  
  <p>Any help from someone more experienced would be appreciated. </p>
  
  <p>I'm using SQL2008R2</p>