i have the following sql select statement, I would like to check if it is possible to have the column rename with the as keyword in the where statement, for example the level_1_data column?
SELECT r.response_row_id, r.form_id, r.level_row, r.acknowledgement_status,
Coalesce(NullIf(r.level_data,''),(select level_data from ResponseRow where response_row_id=r.level_3_row_id)) as level_1_data,
r.level_3_data, r.level_4_data, r.level_3_row_id, r.workflow_status, r.responder_workflow_remark, r.responder_workflow_documents,
r.approver_workflow_remark, r.approver_workflow_documents, r.revision_count, r.created_by,r.created_by_name, r.created_Date,
r.last_modified_by, r.last_modified_by_name, r.last_modified_date, r.is_deleted, r.data_responder
FROM ResponseRow r