If your question is how to select a line in a -p pic window, you can't.
If your question is how to echo some text that's been added to a -p pic window, you can't. There isn't really text there, there's just a bunch of pixels arranged to look like text.
The closest you could come to faking it would be for you to have another @window where you shadow the -p pic window, where each time you write to the pic window you also write to the normal window, which creates a place for you to get the line info from.