There are a few schools that offer essentially that. I'm doing it at WGU.edu, which is a state school in many states (WGU Texas, for example, is a state school in Texas). You finish each class whenever you can pass the test, which in many cases is an industry-recognized certification test from CompTIA, CIW, Microsoft, etc. I just finished my database course, which took me a week to get four college credits since I know the material very well. If you knew ALL the material well enough to pass all of the tests, you could get a bachelor's degree in six months or so. They ALSO provide curriculum to teach you the material, but you study it only as much as you need to.
You mentioned the cost. With WGU, you don't pay per-credit or per-class, but per-semester, and you can take as many courses in that semester as you want. (Minimum 12 credits for financial aid.) IF you knew everything you need to know for your degree, you could do the whole thing in one six-month semester at a cost of only $3000. The tax credit is about $1,200, so the net cost to you is only $1,800.
Personally, I have a full time job, a part-time business, and a family, so I'm doing it in just a few hours per week and it will take a while.
Other schools offer similar programs. WGU offers low cost and reasonable credibility - it's a state school just like Texas A&M, University of Texas, etc. Not AS flagship prestigious, but also not a joke like some online programs. Exclesior is somewhat similar in that you get credit for knowing the material, not for attendance or homework.