1: 2: 3: 4: 5: 6: 7: 8: 9:
select top 1000 orderno, CASE shipnum when 0 then custnum when <>0 then shipno END as shipto from CMS