SELECT 
       CASE WHEN allYear = 'yes' then 'All Year' 
            ELSE CONCAT(FORMAT_DATE('%b %d', start_date), ' to ' ,FORMAT_DATE('%b %d', end_date)) 
       END AS period,
       CASE WHEN allYear = 'yes' then 'All Year'
            WHEN @stage ='Start' then 
                  CASE WHEN FORMAT_DATE('%b', start_date) IN ('Jan','Feb') THEN 'Jan - Feb'
                       WHEN FORMAT_DATE('%b', start_date) IN ('Mar','Apr') THEN 'Mar - Apr'
                       WHEN FORMAT_DATE('%b', start_date) IN ('May','Jun') THEN 'May - Jun'
                       WHEN FORMAT_DATE('%b', start_date) IN ('Jul','Aug') THEN 'Jul - Aug'
                       WHEN FORMAT_DATE('%b', start_date) IN ('Sep','Oct') THEN 'Sep - Oct'
                       WHEN FORMAT_DATE('%b', start_date) IN ('Nov','Dec') THEN 'Nov - Dec'
                   END
            WHEN @stage = 'End' AND currentYear < EXTRACT(YEAR From end_date) then 
                   CASE WHEN FORMAT_DATE('%b', end_date) IN ('Jan','Feb') then 'Jan - Feb Y+1'
                        ELSE '=> Mar Y+1'
                   END
            WHEN @stage = 'End' AND currentYear = EXTRACT(YEAR From end_date) then
                  CASE WHEN FORMAT_DATE('%b', end_date) IN ('Jan','Feb') THEN 'Jan - Feb'
                       WHEN FORMAT_DATE('%b', end_date) IN ('Mar','Apr') THEN 'Mar - Apr'
                       WHEN FORMAT_DATE('%b', end_date) IN ('May','Jun') THEN 'May - Jun'
                       WHEN FORMAT_DATE('%b', end_date) IN ('Jul','Aug') THEN 'Jul - Aug'
                       WHEN FORMAT_DATE('%b', end_date) IN ('Sep','Oct') THEN 'Sep - Oct'
                       WHEN FORMAT_DATE('%b', end_date) IN ('Nov','Dec') THEN 'Nov - Dec'
                   END
       END month,
       *
FROM `fao-maps-review.fao_crop_calendar.vw_crop_calendar_by_stage`
Where cropProcess = @crop_process
      AND cropId = @crop