Replaced two elseifs by if in sqlserver datasource