title: How do I use SQL table alias for more SELECT and with different condition?
body: <p>I want to generate ssrs report for that i need to select 4 values
  PreviousNAV , TodaysNAV , @NetChange , @BAMLIndex</p>
  
  <pre><code>CREATE PROCEDURE [dbo].[Progreereport]
  (
  @EndDate DATETIME,
  @ComparePeriod VARCHAR(10),
  @PortfolioId VARCHAR(50) = '6'
  )
  AS
  BEGIN
  
  DECLARE @StartDate DATETIME =
      CASE
          WHEN @ComparePeriod = 'Daily' THEN dbo.DateUtility_MakeBusinessDay(DATEADD(DAY, -1, @EndDate), 'LessThanOrEqualTo')
          WHEN @ComparePeriod = 'Weekly' THEN dbo.DateUtility_GetRelativeDate(@EndDate, 'LessThan', 'End', 'Week', 1)
          WHEN @ComparePeriod = 'MTD' THEN dbo.DateUtility_GetRelativeDate(@EndDate, 'LessThan', 'End', 'Month', 1)
          WHEN @ComparePeriod = 'QTD' THEN dbo.DateUtility_GetRelativeDate(@EndDate, 'LessThan', 'End', 'Quarter', 1)
          WHEN @ComparePeriod = 'YTD' THEN dbo.DateUtility_GetRelativeDate(@EndDate, 'LessThan', 'End', 'Year', 1)
          WHEN @ComparePeriod = 'LTM' THEN DATEADD(MONTH, -12, @EndDate)
          WHEN @ComparePeriod = 'LTD' THEN CAST(Fireball_Configuration.dbo.GetConfigurationValue('Fireball', 'Concerto Credit Opportunity Master Fund I - Inception Date') AS DATETIME)
      END
  
    DECLARE @PreviousNAV DECIMAL(18,4)
    DECLARE @TodaysNAV DECIMAL(18,4)
    DECLARE @NetChange DECIMAL(18,4)
    DECLARE @BAMLIndex DECIMAL(18,4)
  
    SELECT ISNULL(@PreviousNAV,0) PreviousNAV 
    FROM Fireball..NAV
    WHERE Date = @StartDate and PortfolioId = @PortfolioId 
  
    SELECT ISNULL(@TodaysNAV,0) TodaysNAV 
    FROM Fireball..NAV
    WHERE Date = @EndDate and PortfolioId = @PortfolioId 
  
    SELECT @NetChange = (@TodaysNAV - @PreviousNAV ) 
  
    SELECT @BAMLIndex  = @NetChange / @TodaysNAV
  
    END
    GO
  </code></pre>
  
  <p>I need above four values to generate report 
  but help me to put it into table alias so that i can use it very easily...</p>