Labor time and the exchange value (Marx). What about the quality of the raw materials? Karl Marx writes in his book "capital", that the exchange value of a commodity is determined by the necessary average labor required to produce the commodity. The labor is measured in time.

Here's my question. There are different types of wood for the production of furniture. Why is furniture made of high-quality wood usually more expensive, while the amount of labor (measured in time) is independent of the wood quality? According to Marx, a table made of low-quality wood should be as expensive as a table made of high-quality wood (apart from negligible differences in the processing due to the wood quality). But this is obviously wrong.

What would Marx answer to this question?
The example you've picked is slightly complicated, because I think there are two possible reasons for the difference in price.  Both could contribute at the same time, depending on your view of how wood production works in your example.

1. The labour value invested in growing, harvesting and processing better quality wood (prior to furniture manufacture).  It is natural to suspect that higher quality wood might be harder or more time-consuming to grow, otherwise nobody would bother growing low-quality wood.

2. Rent.  Marx wrote at length about how rent is extracted in capitalist economies.  If growing the best wood is a matter of owning the most fertile land, then the landowner would naturally extract that surplus value from the wood production process.  This rent then shows up in higher prices for higher quality wood.