Phoenix Wright really isn't any of the three- they just put it on VNDB as an exception since it has some VN elements and it's very popular.
A Visual novel is an interactive fiction game, featuring mostly static graphics, most often using anime-style art or occasionally live-action stills (and sometimes video footage). They somewhat resemble mixed-media novels. Took this from google, btw.
Eroge is something a lot of people use to refer to visual novels as a whole (incorrectly, I believe), even the ones without erotic content. An eroge is technically an erotic game, I guess. Any VN with sexual contet counts as an Eroge.
A dating sim is, as the name suggests, a dating simulator. I believe you.... Well, simulate dating in one of them! A dating sim is not a visual novel, although it can have VN elements.