MySQL - Creating an associative table
For that many-to-many 'relation' table, don't bother to have an id.  Simply have

PRIMARY KEY(case_id, tag_id),
INDEX(tag_id, case_id)


Note that one of those works perfectly for one of your SELECTs, the other works perfectly for the other.  (Use ENGINE=InnoDB.)

To get (tag-1, tag-2, tag-3), use GROUP_CONCAT().

FOREIGN KEYs are optional; I would not bother.