Can i create Custom check constraint in SQL Server?

I have a table 'City' having columns as 'ID' , 'Name' and 'Number'.
If Name is 'AA' then Number column shouldn't accept null values. If name is other than 'AA' Number column can be null