How to make Camera Shake relative to distance?

I want to achieve a simple camera shake effect, whereas the farther you are from the point, the weaker the camera shake is. I do not know how to accomplish this at all. Help would be needed