I believe you're referring to a line of Gandalf's from An Unexpected Journey, the first part of Peter Jackson's Hobbit film trilogy, which featured quite prominently in the announcement trailer:
Gandalf: You'll have a tale or two to tell of your own when you come back.
Bilbo: Can you promise that I will come back?
Gandalf: No. And if you do, you will not be the same.
The Hobbit: An Unexpected Journey (2012)
As best I recall, this line does not appear in The Hobbit, nor in any of Tolkien's other works. There's a faintly similar line at the end of the book, where Gandalf reflects on Bilbo's development:
Gandalf looked at him. "My dear Bilbo!" he said. "Something is the matter with you! You are not the hobbit that you were."
The Hobbit Chapter 19: "The Last Stage"