Reputation: 415
My form has a 'did you seek medical attention' checkbox that returns value as true or false. I want to print this result out in a form, however i want the value to return 'Did/ Did not seek medical attention' instead of the boolean value. I have this so far:
Case when md.seen_doctor = 'FALSE' THEN CAST (md.gweld_doctor AS Varchar(15))
I don't know how to assign the different value.
Upvotes: 1
Views: 725
Reputation: 5525
SELECT
CASE WHEN
md.seen_doctor = 0
THEN 'Did not seek medical attention'
ELSE 'Did seek medical attention'
end 'Med_Checkbox'
FROM
tbltablename
Upvotes: 0
Reputation: 204794
select case when md.seen_doctor = 'FALSE'
then 'Did not seek medical attention'
else 'Did seek medical attention'
end as res_checkbox
from your_table
Upvotes: 1