select a.acdyear_number as accidentID,
case
  when a.vehicle_direction = '01' THEN 'NB'
  when a.vehicle_direction = '02' THEN 'SB'
  when a.vehicle_direction = '03' THEN 'EB'
  when a.vehicle_direction = '04' THEN 'WB' 
  ELSE 'XX' 
END as initialTravelDirection,
case
  when a.vehicle_action = '01' THEN '1'
  when a.vehicle_action = '02' THEN '5'
  when a.vehicle_action = '03' THEN '5'
  when a.vehicle_action = '04' THEN '14'
  when a.vehicle_action = '05' THEN '7' 
  when a.vehicle_action = '06' THEN '8'
  when a.vehicle_action = '07' THEN '8'
  when a.vehicle_action = '08' THEN '11'
  when a.vehicle_action = '09' THEN '12'
  when a.vehicle_action = '10' THEN '9'
  when a.vehicle_action = '11' THEN '10'
  when a.vehicle_action = '12' THEN '10'
  when a.vehicle_action = '13' THEN '3'
  when a.vehicle_action = '14' THEN '4'
  when a.vehicle_action = '15' THEN '4'
  when a.vehicle_action = '16' THEN '2'
  when a.vehicle_action = '17' THEN '10'
  when a.vehicle_action = '18' THEN '14'
  when a.vehicle_action = '19' THEN '14'
  ELSE '99'
END as vehicleManeuver,
case
  when a.vehicle_type = '01' THEN '1'
  when a.vehicle_type = '02' THEN '2'
  when a.vehicle_type = '03' THEN '2'
  when a.vehicle_type = '08' THEN '4'
  when a.vehicle_type = '09' THEN '4'
  when a.vehicle_type = '10' THEN '5'
  when a.vehicle_type = '11' THEN '2'
  when a.vehicle_type = '12' THEN '3'
  when a.vehicle_type = '97' THEN '17'
  ELSE '99' 
END as vehicleConfiguration,
case
  when a.operator_dob = '00000' THEN '00000'
  ELSE to_char(to_date(a.operator_dob, 'yyyyddd'), 'yyyy/mm/dd') 
END as driverDOB
FROM  acdu_units_loc_02_09 a;