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<a<1$, 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.