how about this.
Select *
From (
Select batchid, wigitid, '*' wigitname
From BATCHMAST
) As BMast
Pivot (MAX(wigitname) For WigitId In ([MT8],[MT6],[M89A],[M89D],[M90])) As Pvt
OR try below also if you dont' want null in result
Select batchid,
ISNULL([MT8],'') [MT8],
ISNULL([MT6],'')[MT6],
ISNULL([M89A],'')[M89A],
ISNULL([M89D],'')[M89D],
ISNULL([M90],'')[M90]
From (
Select batchid, wigitid, '*' wigitname
From BATCHMAST
) As BMast
Pivot (MAX(wigitname) For WigitId In ([MT8],[MT6],[M89A],[M89D],[M90])) As Pvt