I have what feels like a simple question, but can't seem to get it right. I'm just trying to execute a regular IF ... THEN ... logic, but can't seem to get it right:

```
set @var:=2;
if @var=1 THEN select 'hello';

```

I get:

> 
> ERROR 1064 (42000):
> 
> 
> You have an error in your SQL syntax; check the
> manual that corresponds to your MySQL server version for the right
> syntax to use near 'if @var=1 THEN select 'hello'' at line 1
> 
> 
> 

What am I missing?