I would do something like this:
Give the enemy an instance variable WhereToSpawn
every x seconds
system create enemy at (0,0)
enemy set variable WhereToSpawn to choose(1,2)
system create enemy at (0,0)
enemy set variable WhereToSpawn to choose(3,4)
enemy on created
-- Enemy compare variable WhereToSpawn = 1
enemy set position: x = random(viewportleft(0),Viewportright(0) y = Viewporttop(0)-100
-- Enemy compare variable WhereToSpawn = 2
enemy set position: x = Viewportright(0)+100 y = random(Viewporttop(0),Viewportbottom(0))
-- Enemy compare variable WhereToSpawn = 1
enemy set position: x = random(viewportleft(0),Viewportright(0) y = viewportbottom(0)+100
-- Enemy compare variable WhereToSpawn = 1
enemy set position: x = Viewportleft(0)-100 y = random(Viewporttop(0),Viewportbottom(0))