Does the case statement in sql server have to be used with select?

does the, CASE WHEN THEN statement have to be used with the select statement in SQL server?

declare @i int
set @i=100
case @i
    when 100 then print 100
    when 200 then print 200
    else print 300
end

the above statement reported an error

Jan.13,2022
Menu