I think your question/problem is actually underspecified to be answerable. What exactly do you want? (non-exhaustive list):
1. have your entire system use a newer version of some library?
2. have a specific part of your system use a newer version of some library?
3. build a particular package to use a newer version of some library?
4. just get access to the accompanying executables/tools from a newer version of a library?
5. get a whole bunch of versions so you can test your project against them?
It really depends, and, sure, some of these are very hard to do... but also some of these are really hard problems to begin with, so it's not unsurprising the solution is also a bit involved.
(My answers for these cases:)
1. build a package for the newer library from source; either from included packaging or by transplanting packaging from an earlier version. If it doesn't work, this is an indicator that you have a bigger problem and maybe shouldn't be shoehorning this in.
2. If the newer version is a higher SO version, install that and rebuild part of your system to use it. (Because you need to rebuild anyway.) If it's the same SO version you'll need to install it somewhere else and set up LD_LIBRARY_PATH.
3. Just build the library statically and build the package against that.
4. Build the library/tools with static linking.
5. No free lunch, this is a nontrivial problem. Doable with LD_LIBRARY_PATH and PKG_CONFIG_PATH.