"Mary told me a story, which made me laugh." Mary's telling you a story made you laugh, but not the story itself.
"Mary told me a story which made me laugh." The story Mary told you made you laugh.
I'm guessing the second sentence reflects the intended meaning, and if I'm right, I'd suggest you change "which" to "that."
- For Teachers