You gotta be way more specific than that. What type of beer? Yeast? Fermentation temp? Raspberries can cause raspberry flavor, but without any info its harder to diagnose.
That being said, raspberry like flavors sound like esters which can be produced by fermenting too warm. So Im gonna shoot with estery, but its hard to tell