Selection will only return hits at the granularity of the objects themselves, so it’s not very useful or efficient in this particular context.
A reading of the depth buffer followed by a reverse projection (gluUnProject) makes quite a bit more sense in this scenario, that is if pinpoint accuracy is not a requirement (you’re really at the mercy of zbuffer precision here).
Line tracing is also a good possibility, probably the best. A bit more difficult to implement robustly, but more accurate and potentially more efficient, depending on the algorithm.