I've come across instances where I felt using both was just fine. The dictionary definition doesn't provide much clarity either. Could someone please clarify the differences between the two?
Whence is an old-fashioned word for where, or from where.
Hence, on the other hand, is best illustrated with a bit of algebra: X is > Y; Z is < Y; hence, X is > Z. Hence means therefore.
"Then said they unto him, Tell us, we pray thee, for whose cause this evil is upon us; What is thine occupation? and whence comest thou? what is thy country? and of what people art thou?"
As @tchrist comments, you need to consider the three sets of three:...
But in practice the last set are pretty dated/archaic forms in all contexts, and the middle set are normally only used metaphorically today.
Once you stop to think about the fact that the usage is metaphoric, it should become clear. Here are some written instances from Google Books...
You won't come across whence so often these days, but (as I hope those examples illustrate) it can sometimes be used in contexts where either or both the others would be perfectly acceptable.
Since the usages are all metaphoric, the "location" of the "statement" (or thing referenced by the statement) is somewhat uncertain. In speech/physical space, the difference between "There it is!" and "Here it is!" may simply depend on whether you're pointing a finger or spreading your hands as you speak.
But at any point within a written text, here could encompass the entire book you're reading, and there could mean just the previous sentence or clause. And where/wherefrom/whence can always refer to anything written previously (normally, the immediately-preceding statement).
To sum it all up - if you're not sure which to use, stick with the most common form (hence). If there's a strong sense of from there or from where in your context, use thence or whence.