As long as you're only dealing with one ID at a time, you can use this syntax:
declare @id int
set @id = null
SELECT
CASE WHEN @id is null
THEN null
ELSE 'Forehead Barcode' END
AS [ID/IDType],
RTRIM(@id) as [Value]
for XML PATH(''),TYPE, ELEMENTs absent
----------------------------------------------------------------------------------
Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?