Combining all conditions
select a.* from tbl_Company a
where a.Company_ID NOT IN (1,2)
AND (
(0 =
CASE WHEN (@Fromdate = '' or @Todate='')
THEN 0
ELSE 1
END
) -- if 0=0 true , if 0=1 fails (filter only when the fromdate and todate is present)
OR
(a.Created_Date between @Fromdate and @Todate )
)