สมมุติเทเบิล T มีฟิลด์ ID, F1, F2, F3
select ID, F1, F2, F3 , min(F0) as FMin
from
( select ID, F1, F2, F3, iif(F1 = 0, NULL, F1) as F0 from T
union all select ID, F1, F2, F3, iif(F2 = 0, NULL, F2) as F0 from T
union all select ID, F1, F2, F3, iif(F3 = 0, NULL, F3) as F0 from T)
group by ID, F1, F2, F3
order by ID