You join EmployeeLeave and Employees here:
from EmployeeLeave l inner join Employees E
on l.empid = e.id
inner join master..spt_values v on v.type='P'
and v.number between 0 and DATEDIFF(month,l.datefrom,l.dateto)
You select the fields from Employees here:
from(
select l.*, e.FirstName, e.Surname, e,MobileNum
(
dateadd(month,datediff(month,0,l.datefrom)+v.number,0)
) as MonthStart, etc
Then, change this:
select e.Firstname, e.Surname, e.MobileNum
to this
select s.Firstname, s.Surname, s.MobileNum
The reason is that you are selecting from a derived table named s, not the actual employees table.