He's just confused right now. Patience, patience. And vigilance.
There are many reasons a dog pee's in his crate - either he can't hold it anymore and just has to go, or he has UTI so he can't hold it too long, or he is desensitized to the pee and just doesn't bother holding it at all, etc. It would be great if you can provide more info - how long he is in the crate, when do you cut-off feed/water before he goes to his crate, etc.
Now, going to his kennel to pee is him thinking, that's where I pee'd before (and it probably still smells like his pee), so I'm running back there to pee. This needs to be corrected by vigilance. But first, you'll need to clean out that crate with vinegar so the pee smell is thoroughly gone. Then, when he's out of his crate, you'll need to be watchful of where he is at all times - you could leash him to your waist so he is always with you if you like. When he looks like he needs to pee, take him out immediately. Also, take him out on a regular schedule even if he doesn't show signs of pee-ing. At 12 weeks, he should be able to hold his pee for 4 hours at a time... but every dog is different, so yours might take shorter periods.
Hope this helps.