I'm trying to create a check on a few columns in my database that forces them to be null unless the value of another column is yes. I've tried something like

```
ALTER TABLE TABLE1
ALTER Column1
CHECK (Column2 = 'y')

```

But that doesn't seem to be working. Is there a way to do it like this, or is there a better way around this problem? Any help in the right direction would be great.