How about this:
CREATE TABLE [#cars](
[id] [int] NOT NULL,
[part1] [int] NULL,
[part2] [int] NULL,
[part3] [int] NULL
) ON [PRIMARY]
INSERT [#cars] (id, [part1], [part2],[part3])
VALUES(1,1,1,1),(2,0,0,0),(3,0,1,0),(4,1,0,0),(5,0,0,1)
SELECT * FROM #cars
SELECT id, part1 as Part, 1 as Seq
FROM #cars
WHERE part1 <>0
UNION ALL
SELECT id, part2 as Part, 2 as Seq
FROM #cars
WHERE part2 <>0
UNION ALL
SELECT id, part3 as Part, 3 as Seq
FROM #cars
WHERE part3 <>0
DROP TABLE #cars
____________________________________________
Space, the final frontier? not any more...
All limits henceforth are self-imposed.
“libera tute vulgaris ex”