select *
from tblproject, tblprojecttype
Where
wwprojectid=case when @projecttype=-2 then ttprojectid end and
serviceid=case when @projecttype=-2 then 15 else
@projecttype
end or
serviceid=case when @projecttype=-2 then 28 else
@projecttype
end and
tblproject.projectstatus=case when @status<>'all' then @status
end and
estimateddeliverydate > case when @status<>'all' then @startdate end and
estimateddeliverydate< case when @status<>'all' then @enddate end
Order By ProjectNum