It depends on the finance terms. I know my credit card company has no fees and no APR for one year on cash advances. You will make more of a return investing the $5,000 in something you can get 3% or so back on in a year and pay back your cash advance piecemeal within the year. But make sure you can pay it off in a year because when the APR kicks in it is nasty. Chris and I have done this several times.
But if the only finance terms you can get are equal to or more than what you could get by investing the $5,000, then I would just pay cash.