# Given $0<a<1$, construct a Borel set with $\mu(A∩I)/\mu(I)=a$ for each open interval $I$

Construction of a Borel set with positive but not full measure in each interval was discussed in this post Construction of a Borel set with positive but not full measure in each interval.

Here I am interested in a finer version. If $$\mu$$ denotes Lebesgue measure, given $$0, how would one construct a Borel set $$A\subset R$$ such that $$\mu(A\cap I)/\mu(I)=a$$ for every open interval $$I$$ in $$R$$?

For simplicity, I am interested in the case where the $$R$$ above is replaced with the unit interval.

$$\lim_{\mu(I) \to 0, x \in I} \frac{\mu(A \cap I)}{\mu(I)} = \chi_A(x)$$
almost everywhere, so $$a$$ would have to be zero or one.