Did you hear about
pivots[
^]?
In your case i would suggest you to use MAX() as aggregate function, for example:
SELECT Number,convert(varchar,datein, 111) as [Date],Operator as [Operator], [6],[7],[8],[9]
FROM (
SELECT *
FROM [Table-Name]
WHERE Number= 95239 and id in ('6','7','8','9') AND datein between @StartDate AND @EndDate) AS DT
PIVOT(MAX([SMS]) FOR [id] IN ( [6],[7],[8],[9])) AS PT