For an odd prime p and a positive integer r, let q=p (R). The objective of this article is to study cyclic codes over the ring S = F-q[u ,v, w]/< u(3)-u,v(2)-v,w(2)-w,uv,vu,uw,wu,vw-wv > and to construct new and better quantum and LCD codes from them. We give the structure of cyclic codes over the ring S and obtain dual-containing codes over F-q as the Gray images of dual-containing cyclic codes over S. Using these dual-containing codes, we obtain quantum codes and determine their parameters using the decomposition of cyclic codes over the ring S. We provide many new and better-than-existing quantum codes. We also give a method to obtain linear complementary dual (LCD) codes over S using the decomposition of cyclic codes over the ring S. We obtain some optimal and best-known linear codes as Gray images of LCD codes over S