With the below query, is it possible to insert some logic which would output a text string into the next column depending on the value of the last column (which is calculated)
e.g. "small" if value <= 10, otherwise "large"
Or do we need to do some logic in TSQL for this?
i.e. open up a cursor, store the value of col#4 in a variable, do our logic on it, and output a string using PRINT depending on its value ?
SUM(CAST(EA.ex_pi_eval_answer_response AS DECIMAL)),
SUM(CAST(EA.ex_pi_eval_answer_response AS DECIMAL)) / COUNT(EA.ex_pi_eval_answer_response)
from tbl_ex_ProgramImpact_eval_answers EA
where EA.ex_pi_eval_answer_ProgramObjective_id = 1
group by EA.ex_pi_eval_answer_school_id