They do make a PS2 to HDMI adapter. I've never used such a device, since my TVs have composite/component inputs, so I can't offer a review. Combine that with an HDMI switch, and I'd imagine you'd be fine, since both PS3 and PS4 already do HDMI output.
The switch I use is just a cheap as hell...