Here’s when a certificate of deposit might be worth considering.