How can I implement WHERE clause depends on one value, like that pseudocode below:
Select * from table WHERE IF(@value is not null) Id > 10 and Name = \'ex