It seems only food can Transfigure into food.
It seems most likely that only food can be Transfigured into food. In a specific example of food-based Transfiguration, Hermione tries to
Transfigure moldy bread. She is unsuccessful, but since she tried it, presumably it theoretically could have worked. This is likely because bread is already food, and only food can be Transfigured into food.
“By nightfall, Harry felt discouraged and anxious, and a supper composed largely of mouldy bread, upon which Hermione had tried a variety of unsuccessful Transfigurations, did nothing to help.”
- Harry Potter and the Deathly Hallows, Chapter 11 (The Bribe)
The first of the Principal Exceptions to Gamp’s Law of Elemental Transfiguration says that food can be transformed, but it seems most likely that it means food can be transformed into other food, not that inedible things can be transformed into food. In the example above, bread is already edible, so it would be possible to Transfigure it into food, but it would not be possible to Transfigure a stick into an apple that can actually be eaten.
“Your mother can’t produce food out of thin air,’ said Hermione. ‘No one can. Food is the first of the five Principal Exceptions to Gamp’s Law of Elemental Transfigur—’
‘Oh, speak English, can’t you?’ Ron said, prising a fishbone out from between his teeth.
‘It’s impossible to make good food out of nothing! You can Summon it if you know where it is, you can transform it, you can increase the quantity if you’ve already got some –”
- Harry Potter and the Deathly Hallows, Chapter 15 (The Goblin’s Revenge)
When Harry, Ron and Hermione are on their extended Horcrux-finding camping trip, they only ever attempt to eat things that were already edible. This is not due to lack of necessity, since they do end up going hungry a lot, and Hermione is skilled enough in magic to at least have attempted to Transfigure food out of something inedible if it was at all theoretically possible, even if she did not ultimately succeed.
“This was their first encounter with the fact that a full stomach meant good spirits; an empty one, bickering and gloom. Harry was the least surprised by this, because he had suffered periods of near starvation at the Dursleys’. Hermione bore up reasonably well on those nights when they managed to scavenge nothing but berries or stale biscuits, her temper perhaps a little shorter than usual and her silences rather dour. Ron, however, had always been used to three delicious meals a day, courtesy of his mother or of the Hogwarts house-elves, and hunger made him both unreasonable and irascible. Whenever lack of food coincided with Ron’s turn to wear the Horcrux, he became downright unpleasant.”
- Harry Potter and the Deathly Hallows, Chapter 15 (The Goblin’s Revenge)
Hermione gets better at finding them edible fungi, but never attempts to turn leaves into sandwiches, for example.
“The fact that Hermione was getting better at identifying edible fungi could not altogether compensate for their continuing isolation, the lack of other people’s company, or their total ignorance of what was going on in the war against Voldemort.”
- Harry Potter and the Deathly Hallows, Chapter 15 (The Goblin’s Revenge)
Additionally, she tells Ron that he can find the ingredients and attempt to charm them into something worth eating, which, in addition to the other evidence seen when they are camping, implies that they need edible ingredients to make into food even while using magic.
“Harry caught the fish and I did my best with it! I notice I’m always the one who ends up sorting out the food; because I’m a girl, I suppose!’
‘No, it’s because you’re supposed to be the best at magic!’ shot back Ron.
Hermione jumped up and bits of roast pike slid off her tin plate on to the floor.
‘You can do the cooking tomorrow, Ron, you can find the ingredients and try and charm them into something worth eating, and I’ll sit here and pull faces and moan and you can see how you –”
- Harry Potter and the Deathly Hallows, Chapter 15 (The Goblin’s Revenge)
Therefore, it seems highly probable that it is not possible to Transfigure anything inedible into food.