There are two ways you can handle this:
1) Create a separate widget for each page/post and use the Widget Logic to make that particular widget only show up on that page/post.
2) Create a single widget, but use the WP PHP Widget plugin to use PHP widgets, rather than text widgets. Then you could use a bunch of if...then statements in each widget to control what it displays.
Frankly, the former method is probably the easiest. If you have more than the merest handful of pages, the code in the second method could become quite cumbersome.