I know this is a very old thread but I believe I have solved the mystery. I purchased a used 27 iMac 5k with 3 black lines on the right hoping I could fix it. I tried everything to figure out why it was bad, GPU, cables, cable connectors, etc. I've also read every question on this topic on this site. It was not until I removed the metal shield on the top rear of the LCD that I saw that it had several cable ribbons from the long PCB connected to the screen. At first I thought the leads were bad, but upon closer inspection I noticed three of the ribbon cables were cut. 3 black lines on the right. 3 ribbon cables cut on the right. It appears that when the last person tried to get into this, they may have used a sharp blade or razor to cut the adhesive. In doing so they sliced too deep and cut into the ribbons! I don't know if the ribbons can be replaced or the rear PCB. I have never seen it sold anywhere and the soldering is so fine it can't be done by hand. :(
Sounds like a TAB error. Post an image of what your screen looks like with your question for confirmation.
iMac 27" i7 3.4 GHz (Late 2012)
If the lines disappear when you apply pressure on the upper vertical edge of the LCD, where the tabs are bonded, you know that the bond has failed. There is really not much of an DIY fix for it.