Use group by Instead of Distinct:_
SElECT t1.MID, t1.VideoName, t2.*,t3.UniID,t3.user_type from dbo.Material AS t1 INNER JOIN dbo.ModuleRelation As t2 ON t2.MID=t1.MID INNER JOIN dbo.Users AS t3 ON t3.UniID=t2.UId where t3.user_type='Staff' and t1.IsDeleted = 0 AND t2.MID='CM1034D' Group by t1.VideoName;