Use ISNULL or COALESCE with a large value out in the future like shown below:Select Case when (COALESCE(date_1,'20990101') < COALESCE(date_2,'20990101') and COALESCE(date_1,'20990101')< COALESCE(date_3,'20990101')) then date_1 when (COALESCE(date_2,'20990101')< COALESCE(date_1,'20990101') and COALESCE(date_2,'20990101')< COALESCE(date_3,'20990101')) then date_2 when (COALESCE(date_3,'20990101')< COALESCE(date_1,'20990101') and COALESCE(date_3,'20990101')< COALESCE(date_2,'20990101')) then date_3end as min_datefrom #temp1