Adaptive Server Enterprise and SQL Anywhere support comparisons between a variable and a scalar value returned by an expression subquery.
create procedure testIf () begin declare var4 int; set var4 = 10; if var4 = (select MIN (a_i1) from a) then set var4 = 100; end if; end;