Yes, but req.ssl_sni is for TCP mode without SSL termination.
Use ssl_fc_sni to get the SNI value of a SSL terminated sessions.
I would strongly recommend to not do this however. If you have certificates with multiple SAN’s or wildcard certificates you may end up routing to the wrong backend. Please always use the host header when you are routing HTTP traffic.