[Emacs] How to insert newline when replacing strings

To insert newline with replace-string use C-q C-j

e.g.

This;is;a;test

M-x replace-string <RET> ; <RET> C-q C-j

This
is
a
test