Text Field state check, login button leads to unique use cases

Sorry if this has been covered, I’ve tried searching for multiple keywords, and in the process learned a lot of useful knowledge, but can’t find what I’d like to do - it seems that I should be able to do what I’m looking to do - maybe not?

So, I have a website I’m building - currently I am building the prototype around three user stories -

I’d like to enter a name into a text field, hit the log in button, have an interaction check which text is entered into the text field and “on click, open link” to specific pages.

So,

if “ABC” is entered in text field, login button goes to page 2
if “DEF” is entered in text field, login button goes to page 6
If “GHI” is entered into text field, login button goes to page 18
if anything else is entered into text field, login button goes to page 27 (username not recognized or similar)

I can do this with hidden hot spots, but I’d prefer to have it “work correctly”…

again, sorry if this is easily solved, I think I’m too close to it.