SQL: Comparing multiple dates
A slightly different and much more efficient approach (single CIX scan instead of SIXTEEN CIX scans). Assuming this table:

CREATE TABLE dbo.tablename
(
  id int PRIMARY KEY,
  gendate1 datetime,  gendate2 datetime,  gendate3 datetime,  gendate4 datetime,
  gendate5 datetime,  gendate6 datetime,  gendate7 datetime,  gendate8 datetime
);


Then we can use this query to unpivot:

DECLARE @date_start datetime = '20190130';

;WITH x AS
(
  SELECT tp.id, tp.d FROM dbo.tablename AS t
  UNPIVOT 
  (
    d FOR ds IN 
    (
      t.gendate1,t.gendate2,t.gendate3,t.gendate4,
      t.gendate5,t.gendate6,t.gendate7,t.gendate8
    )
  ) AS tp
)
SELECT id, 
  next_date = MIN(CASE WHEN d &gt; @date_start THEN d END),
  prev_date = MAX(CASE WHEN d &lt; @date_start THEN d END)
FROM x
GROUP BY id;


If you want a tie when @date_start is a direct hit, pick one to change to &gt;= or &lt;= (just don't do that to both).

Results with a single id given the sample data in the question:


  


Plan here is much nicer: