You should consider an investment choice as that investment choice. Understand the risks and potential returns. Don't count one thing as another.
The CD's you're in will return 3% over the X time frame. That may be less or more than inflation depending on X. I'm guessing they're FDIC insured so that means there is little to no risk of loss. But there is a risk to loss due to inflation.
Bonds (we'll use 10 year US treasury as our standard here) return about 5% on average (
source). Also backed by the US so little to no risk of loss. But also has a risk of loss due to inflation or interest rates.
Essentially they have similar risk characteristics but with slightly different returns. There is also the matter of the CD being an X time frame up against the 10 year treasury.
So Bonds may have slightly higher yield depending on the bond with similar risks associated. I'd educate myself on various investments to understand my options better if I were in your shoes. CD's are a great way to have your money chewed up by inflation in our current environment.