Suppose A and B are compact connected sets in the XY plane and XZ plane respectively in R^3. Suppose further that the the range of x-values taken by A and B are the same (i.e, projections of A and B onto the x-axis are the same closed interval). Is there always a connected set in R^3 whose projections onto XY and XZ planes are A and B respectively?
The answer is yes.
Let $\alpha,\beta:[0,1]\to[0,1]\times \mathbb R$ be two paths; $\alpha(t)=\left(\alpha_1(t),\alpha_2(t)\right)$ and $\beta(t)=\left(\beta_1(t),\beta_2(t)\right)$. Assume that $\alpha_1(0)=\beta_1(0)=0$, $\alpha_1(1)=\beta_1(1)=1$.
Proof. Note that for generic smooth choice of $\alpha$ and $\beta$ the set $\Sigma$ is a smooth 1-dimensional manifold which might be not connected, but it has only two boundary points in $a$ and $b$. Thus, in this case one can connect these points by a curve. The general case can be done by approximation. $\square$
The rest is easy: one can approximate $A$ and $B$ by path-connected sets $A'$ and $B'$ with the same property. Thus one can present $A'$ and $B'$ as a union of curves $\alpha$ and $\beta$ with the above property. Moreover we can assume that the ends of $\alpha$ and $\beta$ are fixed (i.e. $a$ and $b$ are fixed). For each pair $(\alpha,\beta)$, choose the connected component of $a$ in $\Sigma$ and take the union of all of them.
Edit: This answer is wrong. But, since Anton based his answer on this idea, I am leaving it up.
No. Let $A$, resp. $B$, be the graph $x=f(y)$, resp. $x=g(z)$, for some continuous functions $f$ and $g$. Pick numbers $0<d<b<a<c<1$, and arrange things so that $f(0)=g(0)=0$, $f(1)=g(1)=1$, and $f(y)$ grows from 0 to $a$, then decreases to $b$, then finally increases to 1, whereas $g(z)$ grows from $0$ to $c$, decreases to $d$, and increases to 1. (Here, $a$, $b$, $c$, $d$ are function values, i.e., values of $x$, not of the arguments $y$ or $z$.)
Now if $C$ projects to $A$ and $B$, respectively, it is not hard to see that $(0,0,0)\in C$ and $(1,1,1)\in C$. Trying to move $(x,y,z)$ continuously from the former to the latter, a contemplation of how $x$ must grow and shrink in order to maintain $x=f(y)$ and $x=g(z)$ leads to a contradiction. (Hard to put in words, but a pair of graphs reveals it I think.)