The best answer I can give is "it depends". Most decisions made about what type of shot to hit in tennis are situational and depend on a variety of factors. If I'm playing someone and they come to net there are lots of things to think through:
- How skilled is my opponent at the net (and at tennis in general)? How good are they at hitting an overhead if I hit a lob?
- How good am I at hitting the shot I intend to hit?
Generally speaking, hitting a slice (a.k.a "backspin") is the easier shot for your opponent to volley, because it will have less pace on it and the trajectory/path of the ball will change less than on a topspin shot. It's also generally easier for your opponent to control the direction of the volley when you hit a slice as well because of less pace on your shot.
If you're good enough to accurately hit a topspin shot where you mean to (down the line or where ever is out of reach for your opponent) then I'd say, hit that. Or if you're good at hitting a topspin lob, hit that. Sometimes you have to try different shots to get a feel for your opponent's skills as well so you might change your tactics from what they were initially.
I know for me personally (I'm about a 4.0 to 4.5 level player) I would have no problem with volleying a slice shot from my opponent - those are actually the kind of shots I try to come to net on, if I can anticipate my opponent hitting one.
Also, if I'm playing doubles, I tend to lob more since there are 2 people at the net. If I'm playing singles, I'll try more passing shots since there's more room to hit past my opponent.
If I noticed that my opponent has a weak overhead, I'll lob more since it's an easy shot for me to hit and I'm not that likely to lose the point off of their overhead.
Hopefully these examples show you how different things factor into shot selection. There really isn't a "best" shot you can teach or recommend for all situations.