I wasn't prepared for this question and didn't have an answer.
That was a mistake. You must be prepared for this common question.
They offered me a range of 42k-50k and asked me to pick. In the moment
I didn't want to sound overly greedy at the higher 50k side, but I
didn't want to sound overly humble at 42k so I said 45.5k.
Was this the "correct" response?
If 45.5k would be a comfortable salary that would make you happy, then it was the "correct" response.
If you will be unhappy accepting 45.5k, then the correct response would have been higher.
What can I do to improve upon this question when or if it ever comes
up again?
Practice how you will answer this question in the future. Try to deflect the question, but have a specific number in mind that you would accept if offered in case they require a specific dollar amount.
- "I'd prefer to put the discussion of salary aside for now - at least until I learn more about the company and the job"
- "I think I bring a lot of value to this job and I'd like a salary commensurate with that value"
- "I think I'm worth [whatever the top of the range being offered is] and I know I can show you that I deserve it"
Do employers take this question and base your actual salary on the
response?
Yes, many do. Some don't. And in some locales, it's not even a question employers are allowed to ask.