I two tables, first one has 2 columns id and name and second one has 2 columns, first column is ID and second one is the comma saprated ids of first table

First Table
ID Name
1 A
2 B
3 c
4 d

Second Table
ID IDs
1 1,2
2 3,4

Now want to write an query which will return me the result like this from second table.

ID IDs
1 1
1 2
2 3
2 4

Please help. Thaks in advanced.