How to play an animation(forward and backward) based on a slider value?

I have a fbx animation and i want to play it forward or backward based on a slider value (just like a video player).
So if a scrub forward in the slider, the animation should play forward!

Please help me in getting an approach to this. Thanks!