Ac and dc magnetization and heat-capacity (C) measurements performed on the pseudo-one-dimensional compound Sr$_3$CuIrO$_6$ reveal a competition between antiferromagnetic (AF) and ferromagnetic (F) exchange couplings, as evidenced by frequency dependence of ac susceptibility and by the absence of a C anomaly at the magnetic transition. The value of the saturation moment (about 0.35 $mu_B$/formula unit) is much smaller than expected for ferromagnetism from the two S=1/2 ions (Cu and Ir). Thus, this compound is not a ferromagnet in zero magnetic field, in contrast to earlier beliefs. Of particular importance is the finding that the value of the magnetic ordering temperature is sample dependent, sensitive to synthetic conditions resulting from deviations in oxygen/Cu content. We propose that this compound serves as a unique model system to test theories on random AF-F interaction in a chain system, considering that this competition can be tuned without any chemical substitution.