I can think of a dozen different explanations that suggests that your friend wasn't lying, so directly confronting them about "their lie" might either shatter their trust on you (if you're wrong) as they'll think you're willing to accuse them of anything without trusting them, or will give them more reasons to lie, to cover up previous lies. Since you don't really know the full picture - you have your conclusion based on a single observation - I think it's best to approach a middle-ground.
Hey [friend name], don't want to be nosy, but I was worried about you the other day. When you mentioned doing your homework, I couldn't help but notice you were playing [game name] at the same time. Was there some other reason you didn't/couldn't talk to me? You know you can trust me, because so far I've been trusting you to be honest with me. We are friends, after all.
This way, you give room for the friend to explain themselves. If they really were busy, then they might explain it to you. There could be a plethora of reasons they might give to defend their case, and you need to be ready to accept them depending on how reasonable they sound:
- "I forgot [game name] running. I thought I had turned off my computer last night."
- "I wanted to get N hours in-game to get the [name] achievement."
- "Huh? Steam must have bugged out - I closed the game hours before that."
- "I let my [sibling/friend] play in my account while I studied."
If, however, you have determined that they were truly lying, try to assess why that happened. Perhaps there is a underlying motive behind it that you never considered? Maybe they felt you were pressuring them and needed a break? Perhaps they felt as though you were judging them too much, so they tried to hide what they were doing? Either way, it is crucial that you do not frame them; again, you don't know the full picture, and wrongly accusing them of anything will make them lose their trust on you instead. If they ask why you were so curious/snooping around/distrusting them, I suggest that you be honest this time:
I was worried you didn't trust me as much as I trust you. If you had lied/Your lie made me feel as though the trust bond in our friendship wasn't mutual.
Or
I felt that it wasn't fair that, while I've been honest all of the time, you could have/have lied to me.
Or something along those lines, always making sure to put the emphasis on how you felt. If they didn't lie, or if they felt they had good reasons to, then chances are you will have hurt their feelings. If that is the case, and if you value this friendship over your pride, an apology will fit well:
I'm sorry, I was overzealous/distrusting of you. I value our friendship and trust too much, and I was worried about what a lie between us might have meant. I hope we can continue on trusting each other and counting on each other for everything.
PERSONAL ADVICE:
Drop the matter. I don't think this was as big of an issue as you might be thinking. Maybe you can still talk about it with them, but personally I'd just pretend it never happened. Now, if this becomes recurring, then fair's fair, your reasons for questioning them would be sound and justified. But, while I'm not a fan of lies either, I'm also not a fan of losing friends/losing their trust/alienating them over smalls issues. At the end of the day, it's up to you to decide whether or not this is really worthy of an issue to tackle with such importance as you're giving it. Be very careful not to hurt their feelings.