how to replace one line in text with several lines

Hi,
I need to replace a specific line in a text (eg the line contains the word MYSERVER) with a number of lines (let's say 4) in which the word MYSERVER will be replaced with
server1 in the first line
server2 in the second line
server3 in the 3rd line
server4 in the 4th line

The original text would be something like
lline1
line2
line3
THIS IS THE LINE WITH MYSERVER
line4
line5

The resulting text should be like:
lline1
line2
line3
THIS IS THE LINE WITH server1
THIS IS THE LINE WITH server2
THIS IS THE LINE WITH server3
THIS IS THE LINE WITH server4
line4
line5

If anyone could help with this it would be great!
Thank you.