a) If you want 0 when value is null
SELECT isnull(PartNum,0) AS PartNumber, PartID
FROM Part
b) If you want 0 when value is null and otherwise 1
SELECT
(CASE
WHEN PartNum IS NULL THEN 0
ELSE 1
END) AS PartNumber,
PartID
FROM Part