It is not working because you can't put a single string into the in clause and expect the engine to parse that.
You can only put in there multiple single values like you did when you used it in the first query.
where id in ('1','2') -- works beause that are two SEPERATE values
where id in ('1,2') -- works not because it is ONE string