Since you have posted the question in SQL Server 2012 TSQL category I assume you are using SQL Server 2012.If that's the case then you can simply use the EOMONTH function
select case datename(WEEKDAY,EOMONTH(getdate()))
when 'Saturday' then convert(datetime,(EOMONTH(getdate())))-2
when 'Sunday' then convert(datetime, (EOMONTH(getdate())))-3
else convert(datetime,EOMONTH(getdate()))-1 end
--------------------------------------------------------------------------------------------------
I am just an another naive wannabe DBA trying to learn SQL Server