Sql Server Create View Inside If Statement