I use this style of gun case:

It is made by Plano and is very good for the money. It is called the 1301 AIRGLIDE GUN CASE. It is listed here at the Plano website:
http://www.planomolding.com/fall/products.asp
I paid about $30. for mine at Cabalas. Don't know if they still sell them though. What I like about this case is that it lets the gun float in its support form. It will handle guns up to 50' long.
As to storing a gun in a foam case, I don't recommend that. I only use my cases to transport my guns. Any foam or cloth case will soak up and hold moisture and that will rust guns as someone has already stated.