If you haven't already, you first need to change the URLs in your application to the form /pages/sports/23
. You then use .htaccess to rewrite the "pretty" URL back to the real URL.
To literally rewrite /pages/sports/23
back into /pages.php?sports_id=23
then you can do something like:
RewriteRule ^pages/sports/23$ pages.php?sports_id=23 [L]
However, you probably want something more generic. But how generic? It's not clear from your question which elements are variable. Something like the following might work for you...
RewriteRule ^([^/])+/([^/])+/(\d{3})+$ $1.php?$2_id=$3 [L]